// Single
// Multi-level
// Multiple
// Hierarchical
// Hybrid
// public / protected / private 
#include<iostream>
using namespace std;

class A
{
    private:
        int x;
    protected:
        void setValue(int v)
        {
            x = v;
        }
    public:
    void getData()
    {
        cout << x << endl;
    }
};

class B : public A
{
    public:
        void setData(int a)
        {
            setValue(a);
        }
};

int main()
{
    B obj;
    obj.setData(5);
    obj.getData();
}